//
//  dEngineOpenGLView.h
//  dEngine
//
//  Created by Daniel Corleone on 23/6/14.
//
//

#import <Cocoa/Cocoa.h>
#include "../src/ItextureLoader.h"
#include "../src/globals.h"

@interface dEngineOpenGLView : NSOpenGLView {
    NSTimer* timer;
    NSOpenGLContext* context;
    
    /* OpenGL names for the renderbuffer and framebuffers used to render to this view */
    GLuint viewRenderbuffer, viewFramebuffer;
    
    /* OpenGL name for the depth buffer that is attached to viewFramebuffer, if it exists (0 if it does not exist) */
    GLuint depthRenderbuffer;
}

@property (nonatomic, readonly, getter = isAnimating) BOOL animating;
@property (nonatomic) NSInteger animationFrameInterval;

- (void) startAnimation;
- (void) stopAnimation;

- (void) loadTexture: (texture_t*)tmpTex;

@end
